<!---
@自动生成 BY Kupe框架 www.kupebank.com
#date : 2018-03-05 14:55:51
#path : app/template/admin/news.editcategory.html
---><!---
@自动生成 BY Kupe框架 www.kupebank.com
#date : 2018-03-05 14:06:27
#path : app/template/admin/news.addcategory.html
--->

<form class="layui-form" action="" style="padding:10px;width:450px;">

 
<div class="layui-form-item">
    <label class="layui-form-label">上一级分类</label>
    <div class="layui-input-block">      
	  {$fid_select}
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">分类名称</label>
    <div class="layui-input-block">
      <input type="text" name="name" required  lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">自定义别名</label>
    <div class="layui-input-block">
      <input type="text" name="name2" placeholder="请输入分类名称" autocomplete="off" class="layui-input">用于SEO优化, 自动拼音 <input type="checkbox" name="py" class="lay-ignore" value=1>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">关键字</label>
    <div class="layui-input-block">
      <input type="text" name="keyword"    placeholder="请输入唯一的分类标识" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">描述</label>
    <div class="layui-input-block">
	  <textarea name="desc" placeholder="请输入描述" class="layui-textarea"></textarea>
    </div>
  </div>
  


  <div class="layui-form-item">
    <label class="layui-form-label">是否显示</label>
    <div class="layui-input-block">
      <input type="checkbox" name="show" value=1 {if $rt.show}checked{/if} lay-skin="switch">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">     排序 </label>
    <div class="layui-input-block">
      <input type="text" name="porder" value="10" required  lay-verify="number" placeholder="请输入排序" autocomplete="off" class="layui-input">
    </div>
  </div>



  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
<input type="hidden" name="id" value="">
<input type="hidden" name="mid" value="">
</form>
 
<script>
formSubmit('{_url m="doeditcategory"}','formDemo','reload');
</script>

<script>
/*编辑专用*/
$(function(){
	{foreach $rt as $k => $v}
		$("input[name='{$k}'][type='text'],input[name='{$k}'][type='hidden']").val("{$v}");
	{/foreach}	
	//$('[name="tag"]').attr('disabled',true);
	$("textarea[name='desc']").val("{$rt.desc}");
	//$("input[name='status']").val("1");
});
</script>